Finding the run length encoding for characters works on most of the test cases except one